package com.coolingme.Object;

import java.io.Serializable;

/**
 * 对象,实现序列化,需要一个序列id
 *
 * @author wangyue
 * @date 2019/4/3 14:15
 */
public class Person implements Serializable {

    private Long serialVersionUID = 123132L;

    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    private String name;

    private Integer age;

    public void hello() {
        System.out.println("Hello,World");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
